{
 "cells": [
  {
   "cell_type": "code",
   "metadata": {
    "collapsed": true,
    "ExecuteTime": {
     "end_time": "2025-02-19T04:03:11.557095Z",
     "start_time": "2025-02-19T04:03:10.319387Z"
    }
   },
   "source": [
    "import time\n",
    "\n",
    "from sklearn.datasets import load_iris, fetch_20newsgroups, fetch_california_housing\n",
    "from sklearn.model_selection import train_test_split, GridSearchCV\n",
    "from sklearn.neighbors import KNeighborsClassifier\n",
    "from sklearn.preprocessing import StandardScaler\n",
    "from sklearn.feature_extraction.text import TfidfVectorizer\n",
    "from sklearn.naive_bayes import MultinomialNB\n",
    "from sklearn.metrics import classification_report\n",
    "from sklearn.feature_extraction import DictVectorizer\n",
    "from sklearn.tree import DecisionTreeClassifier, export_graphviz\n",
    "from sklearn.ensemble import RandomForestClassifier\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "from sklearn.metrics import roc_auc_score"
   ],
   "outputs": [],
   "execution_count": 2
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-19T04:03:11.570391Z",
     "start_time": "2025-02-19T04:03:11.558093Z"
    }
   },
   "cell_type": "code",
   "source": [
    "titan = pd.read_csv(\"./data/titanic.txt\")\n",
    "titan.info()"
   ],
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 1313 entries, 0 to 1312\n",
      "Data columns (total 11 columns):\n",
      " #   Column     Non-Null Count  Dtype  \n",
      "---  ------     --------------  -----  \n",
      " 0   row.names  1313 non-null   int64  \n",
      " 1   pclass     1313 non-null   object \n",
      " 2   survived   1313 non-null   int64  \n",
      " 3   name       1313 non-null   object \n",
      " 4   age        633 non-null    float64\n",
      " 5   embarked   821 non-null    object \n",
      " 6   home.dest  754 non-null    object \n",
      " 7   room       77 non-null     object \n",
      " 8   ticket     69 non-null     object \n",
      " 9   boat       347 non-null    object \n",
      " 10  sex        1313 non-null   object \n",
      "dtypes: float64(1), int64(2), object(8)\n",
      "memory usage: 113.0+ KB\n"
     ]
    }
   ],
   "execution_count": 3
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-19T04:03:11.588372Z",
     "start_time": "2025-02-19T04:03:11.571368Z"
    }
   },
   "cell_type": "code",
   "source": [
    "x = titan[['pclass', 'age', 'sex']]\n",
    "y = titan['survived']\n",
    "print(x.info()) \n",
    "x.describe(include='all')"
   ],
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 1313 entries, 0 to 1312\n",
      "Data columns (total 3 columns):\n",
      " #   Column  Non-Null Count  Dtype  \n",
      "---  ------  --------------  -----  \n",
      " 0   pclass  1313 non-null   object \n",
      " 1   age     633 non-null    float64\n",
      " 2   sex     1313 non-null   object \n",
      "dtypes: float64(1), object(2)\n",
      "memory usage: 30.9+ KB\n",
      "None\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "       pclass         age   sex\n",
       "count    1313  633.000000  1313\n",
       "unique      3         NaN     2\n",
       "top       3rd         NaN  male\n",
       "freq      711         NaN   850\n",
       "mean      NaN   31.194181   NaN\n",
       "std       NaN   14.747525   NaN\n",
       "min       NaN    0.166700   NaN\n",
       "25%       NaN   21.000000   NaN\n",
       "50%       NaN   30.000000   NaN\n",
       "75%       NaN   41.000000   NaN\n",
       "max       NaN   71.000000   NaN"
      ],
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>pclass</th>\n",
       "      <th>age</th>\n",
       "      <th>sex</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>1313</td>\n",
       "      <td>633.000000</td>\n",
       "      <td>1313</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>unique</th>\n",
       "      <td>3</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>top</th>\n",
       "      <td>3rd</td>\n",
       "      <td>NaN</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>freq</th>\n",
       "      <td>711</td>\n",
       "      <td>NaN</td>\n",
       "      <td>850</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>NaN</td>\n",
       "      <td>31.194181</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>NaN</td>\n",
       "      <td>14.747525</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>NaN</td>\n",
       "      <td>0.166700</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>NaN</td>\n",
       "      <td>21.000000</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>NaN</td>\n",
       "      <td>30.000000</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>NaN</td>\n",
       "      <td>41.000000</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>NaN</td>\n",
       "      <td>71.000000</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 4
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-19T04:03:11.592885Z",
     "start_time": "2025-02-19T04:03:11.589372Z"
    }
   },
   "cell_type": "code",
   "source": "x.loc[:,'age'].max()",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "np.float64(71.0)"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 5
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-19T04:03:11.596573Z",
     "start_time": "2025-02-19T04:03:11.592885Z"
    }
   },
   "cell_type": "code",
   "source": [
    "mean=x['age'].mean()\n",
    "print(mean)\n",
    "x.loc[:,'age']=x.loc[:,'age'].fillna(mean)"
   ],
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "31.19418104265403\n"
     ]
    }
   ],
   "execution_count": 6
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-19T04:03:11.602077Z",
     "start_time": "2025-02-19T04:03:11.596573Z"
    }
   },
   "cell_type": "code",
   "source": "x.info()",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 1313 entries, 0 to 1312\n",
      "Data columns (total 3 columns):\n",
      " #   Column  Non-Null Count  Dtype  \n",
      "---  ------  --------------  -----  \n",
      " 0   pclass  1313 non-null   object \n",
      " 1   age     1313 non-null   float64\n",
      " 2   sex     1313 non-null   object \n",
      "dtypes: float64(1), object(2)\n",
      "memory usage: 30.9+ KB\n"
     ]
    }
   ],
   "execution_count": 7
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-19T04:03:11.608245Z",
     "start_time": "2025-02-19T04:03:11.603074Z"
    }
   },
   "cell_type": "code",
   "source": [
    "x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=0.25, random_state=4)\n",
    "print(x_train.head())"
   ],
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "    pclass        age     sex\n",
      "598    2nd  30.000000    male\n",
      "246    1st  62.000000    male\n",
      "905    3rd  31.194181  female\n",
      "300    1st  31.194181  female\n",
      "509    2nd  64.000000    male\n"
     ]
    }
   ],
   "execution_count": 8
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-19T04:03:11.612242Z",
     "start_time": "2025-02-19T04:03:11.608245Z"
    }
   },
   "cell_type": "code",
   "source": "type(x_train)",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "pandas.core.frame.DataFrame"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 9
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-19T04:03:11.615854Z",
     "start_time": "2025-02-19T04:03:11.612242Z"
    }
   },
   "cell_type": "code",
   "source": "sum(y_train)",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "334"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 10
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-19T04:03:11.621852Z",
     "start_time": "2025-02-19T04:03:11.616851Z"
    }
   },
   "cell_type": "code",
   "source": "x_train[x_train['sex'] == 'female'].count()",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "pclass    341\n",
       "age       341\n",
       "sex       341\n",
       "dtype: int64"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 11
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-19T04:03:11.626185Z",
     "start_time": "2025-02-19T04:03:11.622852Z"
    }
   },
   "cell_type": "code",
   "source": "y_train",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "598     0\n",
       "246     0\n",
       "905     0\n",
       "300     0\n",
       "509     0\n",
       "       ..\n",
       "360     0\n",
       "709     0\n",
       "439     0\n",
       "174     0\n",
       "1146    0\n",
       "Name: survived, Length: 984, dtype: int64"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 12
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-19T04:03:11.632182Z",
     "start_time": "2025-02-19T04:03:11.626185Z"
    }
   },
   "cell_type": "code",
   "source": [
    "z=x_train.copy() \n",
    "z['survived'] = y_train \n",
    "z[z['sex'] == 'female']['survived'].value_counts() "
   ],
   "outputs": [
    {
     "data": {
      "text/plain": [
       "survived\n",
       "1    230\n",
       "0    111\n",
       "Name: count, dtype: int64"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 13
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-19T04:03:15.315080Z",
     "start_time": "2025-02-19T04:03:15.309561Z"
    }
   },
   "cell_type": "code",
   "source": "z[z['sex'] == 'male']['survived'].value_counts()",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "survived\n",
       "0    539\n",
       "1    104\n",
       "Name: count, dtype: int64"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 14
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-19T03:45:33.829469Z",
     "start_time": "2025-02-19T03:45:33.825329Z"
    }
   },
   "cell_type": "code",
   "source": "y_train.value_counts() ",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "survived\n",
       "0    650\n",
       "1    334\n",
       "Name: count, dtype: int64"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 13
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-19T03:45:33.835089Z",
     "start_time": "2025-02-19T03:45:33.830470Z"
    }
   },
   "cell_type": "code",
   "source": "x_train.loc[:,'sex'].value_counts()",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "sex\n",
       "male      643\n",
       "female    341\n",
       "Name: count, dtype: int64"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 14
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-19T03:45:33.838674Z",
     "start_time": "2025-02-19T03:45:33.835089Z"
    }
   },
   "cell_type": "code",
   "source": "230/(230+111)",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.6744868035190615"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 15
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-19T03:45:33.844911Z",
     "start_time": "2025-02-19T03:45:33.838674Z"
    }
   },
   "cell_type": "code",
   "source": "x_train",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "     pclass        age     sex\n",
       "598     2nd  30.000000    male\n",
       "246     1st  62.000000    male\n",
       "905     3rd  31.194181  female\n",
       "300     1st  31.194181  female\n",
       "509     2nd  64.000000    male\n",
       "...     ...        ...     ...\n",
       "360     2nd  31.194181    male\n",
       "709     3rd  28.000000    male\n",
       "439     2nd  34.000000    male\n",
       "174     1st  46.000000    male\n",
       "1146    3rd  31.194181    male\n",
       "\n",
       "[984 rows x 3 columns]"
      ],
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>pclass</th>\n",
       "      <th>age</th>\n",
       "      <th>sex</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>598</th>\n",
       "      <td>2nd</td>\n",
       "      <td>30.000000</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>246</th>\n",
       "      <td>1st</td>\n",
       "      <td>62.000000</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>905</th>\n",
       "      <td>3rd</td>\n",
       "      <td>31.194181</td>\n",
       "      <td>female</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>300</th>\n",
       "      <td>1st</td>\n",
       "      <td>31.194181</td>\n",
       "      <td>female</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>509</th>\n",
       "      <td>2nd</td>\n",
       "      <td>64.000000</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>360</th>\n",
       "      <td>2nd</td>\n",
       "      <td>31.194181</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>709</th>\n",
       "      <td>3rd</td>\n",
       "      <td>28.000000</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>439</th>\n",
       "      <td>2nd</td>\n",
       "      <td>34.000000</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>174</th>\n",
       "      <td>1st</td>\n",
       "      <td>46.000000</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1146</th>\n",
       "      <td>3rd</td>\n",
       "      <td>31.194181</td>\n",
       "      <td>male</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>984 rows × 3 columns</p>\n",
       "</div>"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 16
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-19T03:45:33.885397Z",
     "start_time": "2025-02-19T03:45:33.844911Z"
    }
   },
   "cell_type": "code",
   "source": "x_train.to_dict(orient=\"records\") ",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[{'pclass': '2nd', 'age': 30.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 62.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 64.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 24.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 21.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 23.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 44.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 37.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 6.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 41.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 30.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 25.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 24.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 57.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 25.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 36.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 51.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 43.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 16.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 19.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 13.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 45.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 36.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 22.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 30.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 16.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 47.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 20.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 57.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 58.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 30.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 61.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 38.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 27.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 35.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 58.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 40.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 32.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 21.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 54.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 19.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 38.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 39.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 52.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 60.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 11.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 21.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 45.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 18.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 28.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 19.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 21.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 21.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 65.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 30.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 28.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 55.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 22.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 36.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 45.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 24.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 20.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 24.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 15.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 26.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 45.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 35.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 22.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 48.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 48.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 30.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 8.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 21.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 27.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 45.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 30.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 25.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 18.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 5.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 25.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 39.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 19.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 36.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 33.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 9.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 26.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 23.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 17.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 36.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 58.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 12.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 23.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 28.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 18.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 36.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 32.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 37.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 25.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 49.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 18.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 44.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 17.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 23.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 32.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 26.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 52.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 28.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 40.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 34.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 27.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 20.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 22.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 40.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 33.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 18.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 37.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 24.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 15.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 28.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 21.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 30.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 20.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 44.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 36.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 39.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 13.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 36.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 12.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 2.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 26.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 27.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 64.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 40.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 42.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 3.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 5.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 22.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 36.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 33.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 45.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 26.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 20.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 18.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 22.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 54.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 11.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 49.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 39.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 22.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 32.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 45.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 10.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 36.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 18.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 18.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 22.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 20.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 44.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 30.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 38.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 27.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 36.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 20.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 6.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 16.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 0.3333, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 25.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 18.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 21.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 17.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 55.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 30.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 21.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 23.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 40.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 48.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 33.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 49.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 47.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 36.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 48.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 45.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 43.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 52.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 28.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 39.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 9.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 34.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 23.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 49.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 27.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 59.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 28.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 41.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 18.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 27.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 33.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 39.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 8.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 43.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 44.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 30.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 36.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 25.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 26.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 30.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 26.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 32.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 18.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 61.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 29.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 29.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 20.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 52.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 42.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 2.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 18.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 25.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 17.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 15.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 19.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 49.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 45.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 20.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 3.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 28.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 37.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 57.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 24.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 30.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 54.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 3.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 24.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 28.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 24.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 25.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 17.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 45.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 48.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 23.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 30.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 49.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 0.1667, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 8.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 35.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 34.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 23.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 33.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 7.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 27.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 18.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 50.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 39.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 50.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 26.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 46.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 35.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 25.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 30.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 24.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 17.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 27.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 33.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 60.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 58.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 20.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 33.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 38.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 30.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 21.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 54.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 63.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 0.9167, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 11.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 21.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 19.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 24.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 43.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 2.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 25.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 45.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 26.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 56.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 19.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 19.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 4.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 45.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 22.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 64.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 32.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 21.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 17.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 55.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 34.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 43.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 17.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 51.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 35.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 22.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 24.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 21.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 26.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 26.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 27.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 53.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 40.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 41.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 36.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 69.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 24.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 30.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 28.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 29.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 24.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 49.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 22.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 26.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 48.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 47.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 24.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 32.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 53.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 45.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 67.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 2.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 32.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 2.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 28.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 35.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 28.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 6.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 50.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 36.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 26.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 56.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 19.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 48.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 1.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 27.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 16.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 21.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 21.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 1.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 30.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 16.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 25.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 4.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 30.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 23.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 16.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 36.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 23.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 40.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 58.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 60.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 32.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 39.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 18.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 16.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 18.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 25.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 27.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 42.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 38.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 32.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 20.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 13.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 32.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 45.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 18.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 29.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 20.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 40.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 32.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 32.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 23.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 3.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 35.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 37.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 47.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 21.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 22.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 22.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 25.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 48.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 24.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 25.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 45.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 9.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 59.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 19.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 19.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 42.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 34.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 42.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 29.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 38.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 33.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 19.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 41.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 24.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 34.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 33.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 5.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 18.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 30.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 42.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 14.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 29.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 30.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 48.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 18.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 35.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 20.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 42.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 17.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 24.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 71.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 29.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 23.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 4.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 30.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 22.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 19.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 30.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 40.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 25.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 6.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 50.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 71.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 9.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 23.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 28.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 53.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 71.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 46.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 49.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 1.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 46.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 37.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 34.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 22.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 19.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 46.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 58.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 22.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 45.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 35.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 41.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 46.0, 'sex': 'female'},\n",
       " {'pclass': '1st', 'age': 36.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 24.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 44.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 57.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 9.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 23.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 24.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 47.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 50.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 50.0, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 34.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 38.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 22.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 18.0, 'sex': 'female'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'female'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 31.19418104265403, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 28.0, 'sex': 'male'},\n",
       " {'pclass': '2nd', 'age': 34.0, 'sex': 'male'},\n",
       " {'pclass': '1st', 'age': 46.0, 'sex': 'male'},\n",
       " {'pclass': '3rd', 'age': 31.19418104265403, 'sex': 'male'}]"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 17
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-19T03:45:33.916953Z",
     "start_time": "2025-02-19T03:45:33.886398Z"
    }
   },
   "cell_type": "code",
   "source": [
    "dict = DictVectorizer(sparse=False)\n",
    "x_train = dict.fit_transform(x_train.to_dict(orient=\"records\"))\n",
    "print(type(x_train))\n",
    "print(dict.get_feature_names_out())\n",
    "print('-' * 50)\n",
    "x_test = dict.transform(x_test.to_dict(orient=\"records\"))\n",
    "print(x_train)"
   ],
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'numpy.ndarray'>\n",
      "['age' 'pclass=1st' 'pclass=2nd' 'pclass=3rd' 'sex=female' 'sex=male']\n",
      "--------------------------------------------------\n",
      "[[30.          0.          1.          0.          0.          1.        ]\n",
      " [62.          1.          0.          0.          0.          1.        ]\n",
      " [31.19418104  0.          0.          1.          1.          0.        ]\n",
      " ...\n",
      " [34.          0.          1.          0.          0.          1.        ]\n",
      " [46.          1.          0.          0.          0.          1.        ]\n",
      " [31.19418104  0.          0.          1.          0.          1.        ]]\n"
     ]
    }
   ],
   "execution_count": 18
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-19T03:45:33.940224Z",
     "start_time": "2025-02-19T03:45:33.917955Z"
    }
   },
   "cell_type": "code",
   "source": [
    "dec = DecisionTreeClassifier()\n",
    "dec.fit(x_train, y_train)\n",
    "print(\"预测的准确率：\", dec.score(x_test, y_test))\n",
    "export_graphviz(dec, out_file=\"tree.dot\",\n",
    "                feature_names=['age', 'pclass=1st', 'pclass=2nd', 'pclass=3rd', 'female', 'male'])"
   ],
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "预测的准确率： 0.8085106382978723\n"
     ]
    }
   ],
   "execution_count": 19
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-19T03:45:33.953073Z",
     "start_time": "2025-02-19T03:45:33.941226Z"
    }
   },
   "cell_type": "code",
   "source": [
    "x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=0.25, random_state=4)\n",
    "dict = DictVectorizer(sparse=False)\n",
    "x_train = dict.fit_transform(x_train.to_dict(orient=\"records\"))\n",
    "x_test = dict.transform(x_test.to_dict(orient=\"records\"))\n",
    "dec = DecisionTreeClassifier(max_depth=7,min_impurity_decrease=0.01,min_samples_split=20)\n",
    "dec.fit(x_train, y_train)\n",
    "print(\"预测的准确率：\", dec.score(x_test, y_test))\n",
    "export_graphviz(dec, out_file=\"tree1.dot\",\n",
    "                feature_names=dict.get_feature_names_out())"
   ],
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "预测的准确率： 0.8206686930091185\n"
     ]
    }
   ],
   "execution_count": 20
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-19T03:45:33.957261Z",
     "start_time": "2025-02-19T03:45:33.953073Z"
    }
   },
   "cell_type": "code",
   "source": "y_train.shape",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(984,)"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 21
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-19T03:45:33.968888Z",
     "start_time": "2025-02-19T03:45:33.958258Z"
    }
   },
   "cell_type": "code",
   "source": [
    "x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=0.25, random_state=4)\n",
    "dict = DictVectorizer(sparse=False)\n",
    "x_train = dict.fit_transform(x_train.to_dict(orient=\"records\"))\n",
    "x_test = dict.transform(x_test.to_dict(orient=\"records\"))"
   ],
   "outputs": [],
   "execution_count": 22
  },
  {
   "cell_type": "code",
   "source": [
    "rf = RandomForestClassifier(n_jobs=-1)\n",
    "param = {\"n_estimators\": [1500,2000, 5000], \"max_depth\": [2, 3, 5, 8, 15, 25]}\n",
    "gc = GridSearchCV(rf, param_grid=param, cv=3)\n",
    "gc.fit(x_train, y_train)\n",
    "print(\"准确率：\", gc.score(x_test, y_test))\n",
    "print(\"查看选择的参数模型：\", gc.best_params_)\n",
    "print(\"选择最好的模型是：\", gc.best_estimator_)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    },
    "ExecuteTime": {
     "end_time": "2025-02-19T03:48:05.973024Z",
     "start_time": "2025-02-19T03:45:33.969891Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "准确率： 0.8328267477203647\n",
      "查看选择的参数模型： {'max_depth': 3, 'n_estimators': 1500}\n",
      "选择最好的模型是： RandomForestClassifier(max_depth=3, n_estimators=1500, n_jobs=-1)\n"
     ]
    }
   ],
   "execution_count": 23
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
